//
//  LQYFirstPageImageAndLabelTableViewCell.m
//  FAKER
//
//  Created by dllo on 15/11/3.
//  Copyright © 2015年 YHLai. All rights reserved.
//

#import "LQYFirstPageImageAndLabelTableViewCell.h"
#import "FitHeader.h"
@implementation LQYFirstPageImageAndLabelTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _topImageView = [[UIImageView alloc]init];
        _topImageView.contentMode = 2;
        _topImageView.clipsToBounds = YES;
        [CONTENT_VIEW addSubview:_topImageView];
        
        _titleLabel = [[UILabel alloc]init];

        _titleLabel.textAlignment = 1;
        _titleLabel.font = [UIFont systemFontOfSize:18];
        if (NSUSERDEFAULTS_NIGHT) {
            _titleLabel.textColor = [UIColor lightGrayColor];
        }
        else{
            _titleLabel.textColor = [UIColor colorWithRed:0.15 green:0.15 blue:0.15 alpha:1];
        }
        [CONTENT_VIEW addSubview:_titleLabel];
        
        _introduceLabel = [[UILabel alloc]init];
        _introduceLabel.textAlignment = 1;
        _introduceLabel.font = [UIFont systemFontOfSize:12];
        if (NSUSERDEFAULTS_NIGHT) {
            _introduceLabel.textColor = [UIColor lightGrayColor];
        }
        else{
            _introduceLabel.textColor = [UIColor colorWithRed:0.69 green:0.69 blue:0.69 alpha:1];
        }
        [CONTENT_VIEW addSubview:_introduceLabel];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _topImageView.frame = CGRectMake(0, 5 * FITHEIGHT, SCREEN_WIDTH, 222.5 * FITHEIGHT);
    _titleLabel.frame = CGRectMake(_topImageView.X, _topImageView.Y + _topImageView.HEIGHT + 17 * FITHEIGHT, SCREEN_WIDTH, 30 * FITHEIGHT);
    _introduceLabel.frame = CGRectMake(_titleLabel.X, _titleLabel.Y + _titleLabel.HEIGHT, SCREEN_WIDTH, 20 * FITHEIGHT);
}



@end
